//饼图
var dataRightPie2=[
	{name:'教育类',value:43261 }, 
	{name:'新闻类',value:12568 },
	{name:'金融类',value:187929},
	{name:'政府类',value:14913 },
	{name:'卫生类',value:26144 }
]


var dataRightPie0=[
	{name:'教育类',value:36037 }, 
	{name:'新闻类',value:13346 },
	{name:'金融类',value:155020},
	{name:'政府类',value:16238 },
	{name:'卫生类',value:22503 }
]	

var dataRightPie1=[
	{name:'教育类',value:16771 }, 
	{name:'新闻类',value:4920 },
	{name:'金融类',value:61599},
	{name:'政府类',value:5180 },
	{name:'卫生类',value:11235 }
]

function dataLegend(data){
	var dataLe=[];
	for(var i=0;i<data.length;i++){
		dataLe.push(data[i].name)
	}
	return dataLe
}

function optRightPie(datas){
	var fontSize=autoFont();
	var pieOpt = {
		color:["#09a7e2","#b8ff2e","#09e24b","#09e2cb","#fce24f","#f46a17","#d40d03"],
	  textStyle: {
	  	fontSize: fontSize
	  },
	  tooltip : {
      trigger: 'item',
      textStyle: {
		  	fontSize: fontSize
		  },
      formatter: "{a} <br/>{b} : {c} ({d}%)"
	  },
	  legend: {
		  show:false,
//		  orient: 'vertical',
	      left: 'left',
	      bottom: 'bottom',
	      textStyle :{
	      	color: '#fff'
	      },
	      data:dataLegend(datas)
	  },
	  series : [
	    {
	      name: '',
	      type: 'pie',
	      radius : ['50%','70%'],
	      center: ['50%', '50%'],
	      data:datas,
	      itemStyle: {
	          emphasis: {
	              shadowBlur: 10,
	              shadowOffsetX: 0,
	              shadowColor: 'rgba(0, 0, 0, 0.5)'
	          }
	      },
	    }
	  ]
	}

	return pieOpt;
}

function optLeftPei(datas){
	var fontSize=autoFont();
	var pieOpt = {
	//  color : ["#fce24f","#b8ff2e","#09e24b","#09e2cb","#09a7e2", "#0841b6", "#30059c", "#68059c","#9c058c","#9c0550"],
		color:["#09a7e2","#b8ff2e","#09e24b","#09e2cb","#fce24f","#f46a17","#d40d03"],
	  textStyle: {
	  	fontSize: fontSize
	  },
	  tooltip : {
	  	textStyle: {
		  	fontSize: fontSize
		  },
      trigger: 'item',
      formatter: "{a} <br/>{b} : {c} ({d}%)"
	  },
	  legend: {
		  show:false,
//		  orient: 'vertical',
	      left: 'left',
	      bottom: 'bottom',
	      textStyle :{
	      	color: '#fff'
	      }
	  },
	  series : [
	    {
	      name: '',
	      type: 'pie',
	      radius : ['50%','70%'],
	      center: ['50%', '50%'],
	      data:datas,
	      itemStyle: {
	          emphasis: {
	              shadowBlur: 10,
	              shadowOffsetX: 0,
	              shadowColor: 'rgba(0, 0, 0, 0.5)'
	          }
	      },
	    }
	  ]
	}
	return pieOpt;
}


   	
var dataLeftPie0=[
	{name:'广东',value:564155},
	{name:'上海',value:324766},
	{name:'福建',value:265161},
	{name:'浙江',value:136610},
	{name:'重庆',value:78114},
	{name:'云南',value:71919},
	{name:'广西',value:38753},
	{name:'陕西',value:38312},
	{name:'黑龙江',value:24952},
	{name:'辽宁',value:17061}
]
var dataLeftPie1=[
	{name:'四川',value:358594},
	{name:'云南',value:71919},
	{name:'重庆',value:78114},
	{name:'贵州',value:4419},
	{name:'西藏',value:290}
]

var dataLeftPie2=[
	{name:'广东',value:564155},
	{name:'上海',value:324766},
	{name:'福建',value:265161},
	{name:'山东',value:220714},
	{name:'浙江',value:136610},
	{name:'江苏',value:121998},
	//{name:'天津',value:121130},
	//{name:'河北',value:59478},
	//{name:'辽宁',value:17061},
	{name:'海南',value:4929}
]   	

var pieRightChart = echarts.init(document.getElementById('ecPieRight'));
//饼图初始化
pieRightChart.setOption(optRightPie(dataRightPie2))

var pieLeftChart = echarts.init(document.getElementById('ecPieLeft'))
//左上饼图初始化
pieLeftChart.setOption(optLeftPei(dataLeftPie2))

//地图
var mapData=[
	{name:'广东',value:564155},
	{name:'四川',value:358594},
	{name:'上海',value:324766},
	{name:'北京',value:294848},
	{name:'福建',value:265161},
	{name:'山东',value:220714},
	{name:'浙江',value:136610},
	{name:'江苏',value:121998},
	{name:'天津',value:121130},
	{name:'湖北',value:79642},
	{name:'重庆',value:78114},
	{name:'云南',value:71919},
	{name:'湖南',value:68045},
	{name:'安徽',value:60144},
	{name:'河北',value:59478},
	{name:'广西',value:38753},
	{name:'陕西',value:38312},
	{name:'江西',value:30715},
	{name:'黑龙江',value:24952},
	{name:'河南',value:21091},
	{name:'辽宁',value:17061},
	{name:'吉林',value:12418},
	{name:'新疆',value:9583},
	{name:'甘肃',value:6508},
	{name:'海南',value:4929},
	{name:'山西',value:4898},
	{name:'贵州',value:4419},
	{name:'宁夏',value:1850},
	{name:'青海',value:1107},
	{name:'内蒙古',value:1055},
	{name:'西藏',value:290},
    {name: '台湾',value: 0 },
    {name: '香港',value: 0 },
    {name: '澳门',value: 0 },
    {name: '南海诸岛',value: 0 }
]
//西南五省
var mapData1=[
	  {name: '北京',value: 0},
	  {name: '天津',value: 0},
	  {name: '上海',value: 0},
	  {name: '重庆',value: 78114},
	  {name: '河北',value: 0},
	  {name: '河南',value: 0},
	  {name: '云南',value: 71919},
	  {name: '辽宁',value: 0},
	  {name: '黑龙江',value: 0},
	  {name: '湖南',value: 0},
	  {name: '安徽',value: 0},
	  {name: '山东',value: 0},
	  {name: '新疆',value: 0},
	  {name: '江苏',value: 0},
	  {name: '浙江',value: 0},
	  {name: '江西',value: 0},
	  {name: '湖北',value: 0},
	  {name: '广西',value: 0},
	  {name: '甘肃',value: 0},
	  {name: '山西',value: 0},
	  {name: '内蒙古',value: 0},
	  {name: '陕西',value: 0},
	  {name: '吉林',value: 0},
	  {name: '福建',value: 0},
	  {name: '贵州',value: 4419},
	  {name: '广东',value: 0},
	  {name: '青海',value: 0},
	  {name: '西藏',value: 290},
	  {name: '四川',value: 358594},
	  {name: '宁夏',value: 0},
	  {name: '海南',value: 0},
	  {name: '台湾',value: 0},
	  {name: '香港',value: 0},
	  {name: '澳门',value: 0},
	  {name: '南海诸岛',value: 0}
	]

//一路带一路
var mapData2=[
	  {name: '北京',value: 0},
	  {name: '天津',value: 0},
	  {name: '上海',value: 324766},
	  {name: '重庆',value: 78114},
	  {name: '河北',value: 0},
	  {name: '河南',value: 0},
	  {name: '云南',value: 71919},
	  {name: '辽宁',value: 17061},
	  {name: '黑龙江',value: 24952},
	  {name: '湖南',value: 0},
	  {name: '安徽',value: 0},
	  {name: '山东',value: 0},
	  {name: '新疆',value: 9583},
	  {name: '江苏',value: 0},
	  {name: '浙江',value: 136610},
	  {name: '江西',value: 0},
	  {name: '湖北',value: 0},
	  {name: '广西',value: 38753},
	  {name: '甘肃',value: 6508},
	  {name: '山西',value: 0},
	  {name: '内蒙古',value: 1055},
	  {name: '陕西',value: 38312},
	  {name: '吉林',value: 12418},
	  {name: '福建',value: 265161},
	  {name: '贵州',value: 0},
	  {name: '广东',value: 564155},
	  {name: '青海',value: 1107},
	  {name: '西藏',value: 290},
	  {name: '四川',value: 0},
	  {name: '宁夏',value: 0},
	  {name: '海南',value: 4929},
	  {name: '台湾',value: 0},
	  {name: '香港',value: 0},
	  {name: '澳门',value: 0},
	  {name: '南海诸岛',value: 0}
	]

//东南沿海
var mapData0=[
	  {name: '北京',value: 0},
	  //{name: '天津',value: 121130},
	  {name: '天津',value: 0},
	  {name: '上海',value: 324766},
	  {name: '重庆',value: 0},
	  //{name: '河北',value: 59478},
	  {name: '河北',value: 0},
	  {name: '河南',value: 0},
	  {name: '云南',value: 0},
	  //{name: '辽宁',value: 17061},
	  {name: '辽宁',value: 0},
	  {name: '黑龙江',value: 0},
	  {name: '湖南',value: 0},
	  {name: '安徽',value: 0},
	  {name: '山东',value: 220714},
	  {name: '新疆',value: 0},
	  {name: '江苏',value: 121998},
	  {name: '浙江',value: 136610},
	  {name: '江西',value: 0},
	  {name: '湖北',value: 0},
	  {name: '广西',value: 0},
	  {name: '甘肃',value: 0},
	  {name: '山西',value: 0},
	  {name: '内蒙古',value: 0},
	  {name: '陕西',value: 0},
	  {name: '吉林',value: 0},
	  {name: '福建',value: 265161},
	  {name: '贵州',value: 0},
	  {name: '广东',value: 564155},
	  {name: '青海',value: 0},
	  {name: '西藏',value: 0},
	  {name: '四川',value: 0},
	  {name: '宁夏',value: 0},
	  {name: '海南',value: 4929},
	  {name: '台湾',value: 0},
	  {name: '香港',value: 0},
	  {name: '澳门',value: 0},
	  {name: '南海诸岛',value: 0}
	]
var mapChart = echarts.init(document.getElementById('ecMap'))


function autoFont(){
	var winW=$(window).width();
	var fontSize=winW>3000?20:12;
	return fontSize;
}
function cityEvt(arr){
    var json=[]
    var fontSize=autoFont()
    console.log(fontSize,'---=-=-=-=')
    for(var i=0;i<arr.length;i++){
        json.push({
        		label: {
        			show: true,
							fontSize: fontSize
        		},
            name: arr[i],
            itemStyle: {
                normal: {
                  borderColor: '#f4e925',
                  areaColor: 'rgba(88,154,225,0.7)'
                }
            }
        })
    }
    return json
}

function getOptionMap(arr,datas) {
	var fontSize=autoFont()
	var optionMap = {
		textStyle:{
			fontSize: fontSize
		},
		tooltip: {
			trigger: 'item',
			textStyle:{
				fontSize: fontSize
			},
			formatter: function(param) {
				return '<div>' + param.name + '</div><div>网站数量：' + param.value + '</div>'
			}
		},
		geo: {
			map: 'china',
			zoom: 1.1,
			roam: false,
			top: '10%',
			label: {
				normal: {
					show: false,
					textStyle: {
						color: '#fff'
					}
				},
				emphasis: {
					show: false,
					textStyle: {
						color: '#fff'
					}
				},
			},
			itemStyle: {
				normal: {
					areaColor: 'rgba(88,154,225,0.1)',
					borderColor: '#589ae1',
					borderWidth: 1,
				},
				emphasis: {
					areaColor: 'rgb(6,214,224)'
				}
			},
			regions:cityEvt(arr)
		},
		series: [{
			//zoom: 1.1,
			type: 'map',
			mapType: 'china',
			geoIndex: 0,
			roam: true,
			label: {
				normal: {
					show: false,
					textStyle: {
						color: '#fff',
						fontSize: fontSize
					}
				},
				emphasis: {
					show: false,
					textStyle: {
						color: '#fff',
						
					}
				}
			},
			data: datas
		}]
	};
	return optionMap;
}


var citySelect0=["新疆","重庆","陕西","甘肃","宁夏","青海","内蒙古","黑龙江","吉林","辽宁","广西","云南","西藏","上海","福建","广东","浙江","海南"]
var citySelect1=['四川','云南','贵州','重庆','西藏']  
var citySelect2=['山东','江苏','浙江','福建','上海','广东','海南']

//地图初始化数据
mapChart.setOption(getOptionMap(citySelect2,mapData2));


//下拉框选择
$(".cityChange").change(function(){
    var n = $(this).val();
    var optionMap = null;
    var optionLine = null;
    var pieOpt = null;
    var dataPie = null;
    if(n == 0){
    	//选中城市
    	mapChart.setOption(getOptionMap(citySelect0,mapData0));
    	pieLeftChart.setOption(optLeftPei(dataLeftPie0));
    	pieRightChart.setOption(optRightPie(dataRightPie0));
    	var dataY = [2837.43,2272.85,2922];
    	$("#comItem_h2").empty();
    	$("#comItem_h2").append("一带一路网站访问量排行");
    	$("#bottom_bar_h2").empty();
    	$("#bottom_bar_h2").append("一带一路网站接入数量占比");
    	$("#imp_middle_h2").empty();
    	$("#imp_middle_h2").append("一带一路网站分布");
    	$("#bottom_list_h2").empty();
    	$("#bottom_list_h2").append("一带一路网站近三个月访问量趋势");
    	//重点地区网站访问量排行
    	var datas = [
    		['vip.com','201450.09'],
    		['pps.tv','152716.23'],
    		['taobao.com','150675.46'],
    		['3322.org','126500.88'],
    		['cntv.cn','91407.76'],
    		['baofeng.com','88624.05'],
    		['people.com.cn','44450.43'],
    		['xinhuanet.com','42772.40'],
    		['gov.cn','39099.94'],
    		['alipay.com','33661.56'],
    		['cztv.com','28712.46'],
    		['wasu.cn','25035.73'],
    		['iqiyi.com','23181.60'],
    		['iqilu.com','21755.13'],
    		['gmw.cn','20540.45'],
    		['hexun.com','19458.09'],
    		['39.net','19404.78'],
    		['che168.com','19282.83'],
    		['cctv.com','15894.43'],
    		['news.cn','15793.75'],
    		['umeng.com','13256.03'],
    		['cs.com.cn','10278.76'],
    		['360doc.cn','9887.95'],
    		['meituan.com','9407.21'],
    		['court.gov.cn','9258.16'],
    		['yicai.com','8757.29'],
    		['zybang.com','8655.40'],
    		['huanqiu.com','8423.59'],
    		['cnzz.com','7815.45'],
    		['tvmao.com','7457.82']
    	];
    	ranklistLeftData(datas,'一带一路');
    	//机房接入网站数量TOP10
    	var data2 = [
    		['阿里云计算有限公司','2387953'],
    		['中国移动通信集团广东有限公司','278255'],
    		['腾讯云计算（北京）有限责任公司','220026'],
    		['中国电信股份有限公司云南分公司','218310'],
    		['网宿科技股份有限公司','170216'],
    		['中国电信股份有限公司上海分公司','120625'],
    		['中国电信股份有限公司福建分公司','118353'],
    		['中国联合网络通信有限公司重庆市分公司','113809'],
    		['中国联合网络通信有限公司广东省分公司','108705'],
    		['中国联合网络通信有限公司福建省分公司','96289']
    	];
    	ranklistRight1Data(data2);
    	
    	//网站接入数量排行
    	
    	var data3 = [
    		['2018-02','东方财富网：中国财经','eastmoney.com',187347781],  
    		['2018-02','王牌手机联盟_国内领','2345.cn',126188046],   
    		['2018-02','首页 - 广发银行','cgbchina.com.cn',39718359],   
    		['2018-02','中证网－中国权威的证券财经资讯网站','cs.com.cn',35728826],   
    		['2018-02','多享金汇-首页','duoxiang.com',26150214],   
    		['2018-02','东方财富网：中国财经','dfcfw.com',24298943],   
    		['2018-02','中国民生银行','cmbc.com.cn',21682088],   
    		['2018-02','全国中小企业股份转让系统','neeq.com.cn',16577003],   
    		['2018-02','南方财富网:今日股票','southmoney.com',14479565],   
    		['2018-02','中信银行金融门户','citicbank.com',12787086]
    	];
    	ranklistRight2Data(data3);
    	
    	$("#top_tip").empty();
    	$("#top_tip").append("截至2018年2月，全国信安系统监测发现“一带一路”地区接入<strong>159.57</strong>万个网站");
    
    	
    	
    }else if(n == 1){
      mapChart.setOption(getOptionMap(citySelect1,mapData1));
    	pieLeftChart.setOption(optLeftPei(dataLeftPie1));
    	pieRightChart.setOption(optRightPie(dataRightPie1));
    	var dataY = [333.24,212.88,479.09];
    	$("#comItem_h2").empty();
    	$("#comItem_h2").append("西南五省网站访问量排行");
    	$("#bottom_bar_h2").empty();
    	$("#bottom_bar_h2").append("西南五省网站接入数量占比");
    	$("#imp_middle_h2").empty();
    	$("#imp_middle_h2").append("西南五省网站分布");
    	$("#bottom_list_h2").empty();
    	$("#bottom_list_h2").append("西南五省网站近三个月访问量趋势");
    	var datas = [
    		['vip.com','38629.89'],
    		['baofeng.com','13227.47'],
    		['taobao.com','11290.92'],
    		['cztv.com','9570.82'],
    		['pps.tv','9355.13'],
    		['cntv.cn','8163.46'],
    		['iqilu.com','7101.88'],
    		['che168.com','7095.16'],
    		['people.com.cn','7078.75'],
    		['xinhuanet.com','6815.92'],
    		['wasu.cn','5384.02'],
    		['biddingx.com','4099.93'],
    		['cctv.com','4061.13'],
    		['court.gov.cn','3471.81'],
    		['hexun.com','3410.18'],
    		['cs.com.cn','3277.28'],
    		['alipay.com','3254.07'],
    		['umeng.com','3052.90'],
    		['iqiyi.com','3007.23'],
    		['gmw.cn','2235.86'],
    		['yicai.com','2217.75'],
    		['chinaso.com','2143.77'],
    		['hebtv.com','2091.41'],
    		['cnzz.com','2056.69'],
    		['gov.cn','1950.40'],
    		['huanqiu.com','1819.91'],
    		['39.net','1812.90']
    	];
    	ranklistLeftData(datas,'西南五省');
    	var data1 = [
    		{name:'工商',value:27329},
    		{name:'金融',value:9579},
    		{name:'不良信息',value:7032},
    		{name:'文化',value:3721},
    		{name:'教育',value:1863},
    		{name:'卫生',value:1160},
    		{name:'电子商务',value:658}
    	];
    	var data2 = [
    		['中国电信股份有限公司四川分公司','272205'],
    		['阿里云计算有限公司','238230'],
    		['成都西维数码科技有限公司','221460'],
    		['腾讯云计算（北京）有限责任公司','220025'],
    		['中国电信股份有限公司云南分公司','217452'],
    		['网宿科技股份有限公司','169768'],
    		['中国联合网络通信有限公司重庆市分公司','113809'],
    		['中国电信股份有限公司云南分公司','86354'],
    		['北京蓝汛通信技术有限责任公司','35473'],
    		['上海帝联信息科技股份有限公司','30968']
    	];
		ranklistRight1Data(data2);
		
		//网站接入数量排行
    	$("#top_tip").empty();
    	$("#top_tip").append("截至2018年2月，全国信安系统监测发现“西南五省”地区接入<strong>51.33</strong>万个网站");
    	
    	
    	var data3 = [
    		['2018-02','遵义医药高等专科学校','zunyiyizhuan.cn',7749932],   
    		['2018-02','医学教育网：中国大型国家医学考试网站','med66.com',2952181],   
    		['2018-02','法律教育网：中国专业','chinalawedu.com',2397349],   
    		['2018-02','升学e网通、升学助考一网通','ewt360.com',1880868],   
    		['2018-02','重庆市工业学校、重庆','cqiss.com',1613465],   
    		['2018-02','建设工程教育网:中国','jianshe99.com',1474366],   
    		['2018-02','体教联盟 ','univsport.com',593491],   
    		['2018-02','育路教育网 - 始创','yuloo.com',534771],   
    		['2018-02','掌门1对1官方网站','zhangmen.com',518570],   
    		['2018-02','云南成人高考,云南医 ','66199.net',445805]
    	];
    	ranklistRight2Data(data3);
    	
    	
    }else if(n == 2){
			mapChart.setOption(getOptionMap(citySelect2,mapData2));
			pieLeftChart.setOption(optLeftPei(dataLeftPie2));
    	pieRightChart.setOption(optRightPie(dataRightPie2));
    	var dataY = [7393.83,5223.57,9979.63];
    	$("#comItem_h2").empty();
    	$("#comItem_h2").append("东南沿海网站访问量排行");
    	/*$("#middle_pie_h2").empty();
    	$("#middle_pie_h2").append("东南沿海");*/
    	$("#bottom_bar_h2").empty();
    	$("#bottom_bar_h2").append("东南沿海网站接入数量占比");
    	$("#imp_middle_h2").empty();
    	$("#imp_middle_h2").append("东南沿海网站分布");
    	$("#bottom_list_h2").empty();
    	$("#bottom_list_h2").append("东南沿海网站近三个月访问量趋势");
        var datas = [
        	['vip.com','273601.79'],
        	['pps.tv','205307.25'],
        	['taobao.com','199829.93'],
        	['baofeng.com','159523.30'],
        	['3322.org','144797.46'],
        	['cntv.cn','126936.06'],
        	['wasu.cn','78876.01'],
        	['cztv.com','58604.89'],
        	['baofeng.net','56715.20'],
        	['people.com.cn','49915.64'],
        	['cnzz.com','46481.40'],
        	['xinhuanet.com','46180.36'],
        	['iqiyi.com','45028.87'],
        	['alipay.com','44653.09'],
        	['gov.cn','41578.11'],
        	['umeng.com','30689.72'],
        	['iqilu.com','29396.39'],
        	['hexun.com','24071.87'],
        	['gmw.cn','23365.99'],
        	['che168.com','21972.12'],
        	['39.net','20915.54'],
        	['cctv.com','20889.16'],
        	['10jqka.com.cn','20128.98'],
        	['dfcfw.com','19077.43'],
        	['court.gov.cn','18747.78'],
        	['yicai.com','18083.23'],
        	['news.cn','17754.87'],
        	['meituan.com','17746.21'],
        	['360doc.cn','14610.56'],
        	['qtmojo.com','14321.86']
        ];
        var data1 = [
        	{name:'金融',value:37774},
        	{name:'工商',value:66691},
        	{name:'不良信息',value:6260}
        ];
        ranklistLeftData(datas,'东南沿海');
//      pieOpt = optRightPie(data1);
        
        var data2 = [
        	['阿里云计算有限公司','2391690'],
        	['中国移动通信集团广东有限公司','278255'],
        	['中国电信股份有限公司山东分公司','236907'],
        	['中国电信股份有限公司江苏分公司','224933'],
        	['腾讯云计算（北京）有限责任公司','220026'],
        	['网宿科技股份有限公司','170334'],
        	['中国联合网络通信有限公司天津市分公司','159685'],
        	['中国联合网络通信有限公司山东省分公司','146934'],
        	['中国电信股份有限公司上海分公司','120625'],
        	['中国电信股份有限公司江苏分公司','120528']
        ];
        ranklistRight1Data(data2);
        
        //网站接入数量排行
    	$("#top_tip").empty();
    	$("#top_tip").append("截至2018年2月，全国信安系统监测发现“东南沿海”地区接入<strong>183.6</strong>万个网站");
    	
    	
    	
    	var data3 = [
    		['2018-02','东方财 富网：中国财经','eastmoney.com',15028863789],    
    		['2018-02','王牌手机联盟_国内领','2345.cn',3367802168],   
    		['2018-02','第一财经_只为更好决策','yicai.com',3201007196],   
    		['2018-02','WE理财官网—人人友','we.com',1015434263],      
    		['2018-02','中国平安保险集团提供','pingan.com.cn',470342323],    
    		['2018-02','1234tv财经直播平台官网','1234tv.com',161929384],    
    		['2018-02','华讯财经-最权威的财','591hx.com',143538972],    
    		['2018-02','中国民生银行','cmbc.com.cn',138594127],    
    		['2018-02','中金在线首页：财经','cnfol.com',96348894],    
    		['2018-02','呱呱财经官方网站','ggcj.com',95768942]
    	];
    	ranklistRight2Data(data3);
    	
    
    }
});


//列表初始化
var datas = [
	['vip.com','273601.79'],
	['pps.tv','205307.25'],
	['taobao.com','199829.93'],
	['baofeng.com','159523.30'],
	['3322.org','144797.46'],
	['cntv.cn','126936.06'],
	['wasu.cn','78876.01'],
	['cztv.com','58604.89'],
	['baofeng.net','56715.20'],
	['people.com.cn','49915.64'],
	['cnzz.com','46481.40'],
	['xinhuanet.com','46180.36'],
	['iqiyi.com','45028.87'],
	['alipay.com','44653.09'],
	['gov.cn','41578.11'],
	['umeng.com','30689.72'],
	['iqilu.com','29396.39'],
	['hexun.com','24071.87'],
	['gmw.cn','23365.99'],
	['che168.com','21972.12'],
	['39.net','20915.54'],
	['cctv.com','20889.16'],
	['10jqka.com.cn','20128.98'],
	['dfcfw.com','19077.43'],
	['court.gov.cn','18747.78'],
	['yicai.com','18083.23'],
	['news.cn','17754.87'],
	['meituan.com','17746.21'],
	['360doc.cn','14610.56'],
	['qtmojo.com','14321.86']
];
ranklistLeftData(datas,'东南沿海');
function ranklistLeftData(datas,type){
	var ranklistLeft = $('#ranklistLeft');
	ranklistLeft.empty();
	var str = "<table border='' cellspacing='' cellpadding='' class='tab_content'>";
	for(var i = 0 ; i < datas.length ; i++){
		var style = 'up';
		if(type == '东南沿海'){
			if(i == 2 || i == 4){
				style = 'down';
			}
		}else if(type == '一带一路'){
			if(i == 1 || i == 2){
				style = 'down';
			}
		}else if(type == '西南五省'){
			if(i == 3 || i == 5){
				style = 'down';
			}
		}
		
		str +="<tr>"+
    	"<td style='width:100px'>"+(i+1)+"</td>"+
    	"<td style='width:100px' title='"+datas[i][0]+"'>"+datas[i][0]+"</td>"+
    	"<td style='width:100px' title='"+datas[i][1]+"'>"+datas[i][1]+"</td>"+
    	"<td style='width:100px'><div class='"+style+"'></div></td>"+
    	"</tr>"
	}
	str +="</table>";
	ranklistLeft.append(str);
}
var data2 = [
	['阿里云计算有限公司','2391690'],
	['中国移动通信集团广东有限公司','278255'],
	['中国电信股份有限公司山东分公司','236907'],
	['中国电信股份有限公司江苏分公司','224933'],
	['腾讯云计算（北京）有限责任公司','220026'],
	['网宿科技股份有限公司','170334'],
	['中国联合网络通信有限公司天津市分公司','159685'],
	['中国联合网络通信有限公司山东省分公司','146934'],
	['中国电信股份有限公司上海分公司','120625'],
	['中国电信股份有限公司江苏分公司','120528']
];
ranklistRight1Data(data2);
function ranklistRight1Data(datas){
	var ranklistRight1 = $('#ranklistRight1');
	ranklistRight1.empty();
	var str = "<table border='' cellspacing='' cellpadding='' class='tab_content tab_content_right'>";
	for(var i = 0 ; i < datas.length ; i++){
		str +="<tr>"+
    	"<td>"+(i+1)+"</td>"+
    	"<td title='"+datas[i][0]+"'>"+datas[i][0]+"</td>"+
    	"<td title='"+datas[i][1]+"'>"+datas[i][1]+"</td>"+
//  	"<td title='"+datas[i][2]+"'>"+datas[i][2]+"</td>"+
    	"</tr>"
	}
	str +="</table>";
	ranklistRight1.append(str);
}

var data3 = [
	['2018-02','东方财富网：中国财经','eastmoney.com',187347781],  
	['2018-02','王牌手机联盟_国内领','2345.cn',126188046],   
	['2018-02','首页 - 广发银行','cgbchina.com.cn',39718359],   
	['2018-02','中证网－中国权威的证券财经资讯网站','cs.com.cn',35728826],   
	['2018-02','多享金汇-首页','duoxiang.com',26150214],   
	['2018-02','东方财富网：中国财经','dfcfw.com',24298943],   
	['2018-02','中国民生银行','cmbc.com.cn',21682088],   
	['2018-02','全国中小企业股份转让系统','neeq.com.cn',16577003],   
	['2018-02','南方财富网:今日股票','southmoney.com',14479565],   
	['2018-02','中信银行金融门户','citicbank.com',12787086]
];

ranklistRight2Data(data3);

function ranklistRight2Data(datas){
	var ranklistRight2 = $('#ranklistRight2');
	ranklistRight2.empty();
	var str = "<table border='' cellspacing='' cellpadding='' class='tab_content tab_content_right2'>";
	for(var i = 0 ; i < datas.length ; i++){
		str +="<tr>"+
    	"<td title='"+datas[i][0]+"' style='width:80px;'>"+datas[i][0]+"</td>"+
    	"<td title='"+datas[i][1]+"' style='width:50px;'>"+datas[i][1]+"</td>"+
    	"<td title='"+datas[i][2]+"' style='width:100px;'>"+datas[i][2]+"</td>"+
    	"<td title='"+datas[i][3]+"' style='width:60px;'>"+datas[i][3]+"</td>"+
    	"</tr>"
	}
	str +="</table>";
	ranklistRight2.append(str);
}

window.addEventListener('resize',function(){
	pieRightChart.resize();
	if($(".cityChange")[0].value==0){
		mapChart.setOption(getOptionMap(citySelect0,mapData0))
		pieLeftChart.setOption(optLeftPei(dataLeftPie0));
    	pieRightChart.setOption(optRightPie(dataRightPie0));
	}else if($(".cityChange")[0].value==1){
		mapChart.setOption(getOptionMap(citySelect1,mapData1))
		pieLeftChart.setOption(optLeftPei(dataLeftPie1));
    	pieRightChart.setOption(optRightPie(dataRightPie1));
	}else if($(".cityChange")[0].value==2){
		mapChart.setOption(getOptionMap(citySelect2,mapData2))
		pieLeftChart.setOption(optLeftPei(dataLeftPie2));
    	pieRightChart.setOption(optRightPie(dataRightPie2));
	}
	mapChart.resize();
	pieLeftChart.resize()
})